import { ElNotification } from 'element-plus'

interface INotify {
  message?: string
  type: number
  title?: string
}
export default function (obj: INotify) {
  switch (obj.type) {
    case 1:
      ElNotification({
        title: obj.title || '',
        message: obj.message || '',
        type: 'success'
      })
      break
    case 0:
      ElNotification({
        title: obj.title || '',
        message: obj.message,
        type: 'error'
      })
      break
    default:
      break
  }
}
